/*************************************************************************
 *
 *  Copyright (C) 2013 Florian Dang <florian.coin@gmail.com>
 *
 *  This file is part of NatusVerse.
 *
 *  NatusVerse is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  NatusVerse is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with NatusVerse.  If not, see <http://www.gnu.org/licenses/>.
 *
 *************************************************************************/

#ifndef INC_LIFE_LIFE_H_
#define INC_LIFE_LIFE_H_

/*!
 * \file        life.h
 * \brief       life description for Conway's Game of Life
 * \author      Florian Dang
 * \date        2013
 */

#include <stdio.h>

#include "life/automaton.h"
#include "graphics/graphics.h"

namespace life
{
//! Life class
/*!
  Conway's Game of Life
*/
class Life
{
	public:
		typedef graphics::Graphics Window;

		//! default constructor
		Life() {}

		//! classic constructor
		Life(Window win0)
			: win_(win0) {}

		//! classic constructor
		Life(Window win0, Automaton automaton0)
			: win_(win0), automaton_(automaton0) {}

		//! destructor
		~Life() {}

		inline Window    win() const       { return win_ ; }
		inline Automaton automaton() const { return automaton_; }

		inline void set_automaton(Automaton automaton0)
		{
			automaton_ = automaton0;
		}

		void GameOfLife(const int& num_col, const int& num_line);
		void Display() const;

	private:
		 Window    win_;       /*!< */
		 Automaton automaton_; /*!< */

};
} // end namespace life
#endif  // INC_LIFE_LIFE_H_
